package cn.internship.modules.manage.dao;

import cn.internship.modules.manage.entity.ClassInfoEntity;
import cn.internship.modules.manage.entity.MajorInfoEntity;
import cn.internship.modules.manage.entity.vo.ClassInfoList;
import cn.internship.modules.manage.entity.vo.MajorList;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 
 * 
 * @author haha
 * @email haha@gmail.com
 * @date 2023-02-20 15:58:08
 */
@Mapper
public interface MajorInfoDao extends BaseMapper<MajorInfoEntity> {

    @Select("select a.*,b.name as dept_name from major_info a\n" +
            "    left join dept_info b on a.dept_id =b.id ${ew.customSqlSegment}")
    IPage<MajorList> queryList(IPage<MajorInfoEntity> userPage, @Param(Constants.WRAPPER) Wrapper<MajorInfoEntity> userWrapper);
	
}
